﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wallpaper.Models.Interfaces;

namespace Wallpaper.Models.Entities
{
    /// <summary>
    /// 用户实体
    /// </summary>
    public class User : BaseEntity, IHasTimestamps,ISoftDelete
    {

        /// <summary>
        /// 微信OpenId（用户唯一标识）
        /// </summary>
        public string OpenId { get; set; }

        /// <summary>
        /// 用户昵称
        /// </summary>
        public string Nickname { get; set; }

        /// <summary>
        /// 个性签名
        /// </summary>
        public string Signature { get; set; }


        /// <summary>
        /// 性别：male-男，female-女，unknown-未知
        /// </summary>
        public string Gender { get; set; }

        /// <summary>
        /// 头像URL地址
        /// </summary>
        public string AvatarUrl { get; set; }

        /// <summary>
        /// 用户积分
        /// </summary>
        public int Points { get; set; }

        /// <summary>
        /// 今日剩余免费下载次数（每天重置）
        /// </summary>
        public int TodayFreeDownloadCount { get; set; }

        /// <summary>
        /// 最后下载日期（用于判断是否跨天重置免费次数）
        /// </summary>
        public DateTime LastDownloadDate { get; set; }

        /// <summary>
        /// 用户IP地址
        /// </summary>
        public string IPAddress { get; set; }


        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; }

        /// <summary>
        /// 最后登录时间
        /// </summary>
        public DateTime? LastLoginTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }

        /// <summary>
        /// 最后更新时间
        /// </summary>
        public DateTime? UpdatedAt { get; set; }

        /// <summary>
        /// 软删除标志：true-已删除，false-正常
        /// </summary>
        public bool IsDeleted { get; set; }
    }

}
